# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=avrdude
pkgver=6.3
pkgrel=2
pkgdesc="Download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers"
url="http://www.nongnu.org/avrdude/"
arch="all"
license="GPL"
makedepends="linux-headers bash flex byacc libftdi1-dev libusb-compat-dev elfutils-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.savannah.gnu.org/releases/avrdude/${pkgname}-${pkgver}.tar.gz"

builddir="$srcdir/${pkgname}-${pkgver}"

prepare() {
	default_prepare || return 1
	update_config_guess || return 1
}

build() {
	cd "$builddir"
	./configure \
		--mandir=/usr/share/man \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-linuxgpio || return 1
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="b671008388d6a552e71066fec46429bc7f6639e8eac41113bcbba5a56212b78be31fcf04956b31e11c6b14888b0f6e825f7458395b9ff4fc28406074c7ded2b2  avrdude-6.3.tar.gz"
